<%--
  Created by IntelliJ IDEA.
  User: ememory
  Date: 05.Oca.2011
  Time: 17:05:22
  To change this template use File | Settings | File Templates.
--%>


<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>BoB Events</title>
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/1.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/2.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/3.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/4.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/5.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/6.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/7.css" />
<link rel="stylesheet" type="text/css" href="/bob-web/CSS/3c-lcrc-static-pp-layout.css" />
<link rel="stylesheet" type="text/css" href="/bob-web/CSS/3c-lcrc-static-pp-presentation.css" />
<link rel="stylesheet" type="text/css" href="/bob-web/CSS/2FEu-VTjHxG.css" />

    <script src="/bob-web/CSS/jquery-1.2.2.pack.js" type="text/javascript"></script>
    <link href="/bob-web/CSS/facebox.css" media="screen" rel="stylesheet" type="text/css" />
    <script src="/bob-web/CSS/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
    jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox()
    })
</script>

<script>
function setTweet(){
    document.getElementById('tweet').value = document.getElementById('tweetText').innerHTML;
}
</script>

</head>
<body class="profile">
<!-- left column -->
<div id="lh-col"><br />
  <%@ include file="/WEB-INF/jsp/leftScreen.jsp" %>
</div>
<!-- end of left column -->
<!-- center column -->

    <!-- Tabs -->
    <%@ include file="/WEB-INF/jsp/tabs.jsp" %>
    <!-- End of tabs -->

  <div>





    <table>
      <tr height="50">

      </tr>
      <table width="90%" border="0" cellpadding="5">
          <tr>
              <td colspan="3">

                      <h2>${model.event.eventName}</h2>
            </td>
          </tr>

          <tr>
              <td>
			  <a href="/bob-web/service/event.htm?event_id=${model.event.eventId}"> ${model.event.eventName}</a>

               <br>
                  Description:  ${model.event.description}
              <br>
                  Location: ${model.event.location}
                  <br>
                  Start Date:   ${model.event.startDate}
              <br>
                  End Date:   ${model.event.endDate}
              <br>
                  Owner: <a href="/bob-web/service/myWall.htm?wantedUserId=${model.event.ownerUser.userId}"> ${model.event.ownerUser.name} ${model.event.ownerUser.surname}</a>
              </td>
          </tr>
		  <tr>
		  	<td colspan="4">
				<hr>
			</td>
		  </tr>
          <tr><td><c:if test="${model.isJoined == true}">
              <a href="/bob-web/service/event.htm?event_id=${model.event.eventId}&action=remove">Leave Event</a>
          </c:if>
          <c:if test="${model.isJoined != true}">
            <a href="/bob-web/service/event.htm?event_id=${model.event.eventId}&action=add">Join Event</a>
          </c:if></td></tr>
          <tr>
              <td>
                  <h2>Participants of this event:</h2>
                  <table width="300px" border="0" cellpadding="5">
        <c:forEach items="${model.topMembers}" var="user">
          <tr>
            <td><c:if test="${user.image == null}">
                <img class="img" width="20" height="20" src="/bob-web/user_images/no_photo.jpg"></c:if>
              <c:if test="${user.image != null}">
                  <img class="img" width="20" height="20" src="/bob-web/user_images/${user.image}"></c:if></td>
            <td><a href="/bob-web/service/myWall.htm?wantedUserId=${user.userId}"> ${user.name} ${user.surname}</a><br></td>
          </tr>
        </c:forEach>
      </table>

      <h2>Event Feeds</h2>
    <form action="/bob-web/service/event.htm?event_id=${model.event.eventId}" method="POST" onSubmit="return setTweet()" >
    <div class="UIComposer clearfix UIComposer_STATE_PIC_NONE UIComposer_STATE_INPUT_FOCUSED" id="c4cd6e42e87b4a4653003519">
      <div class="pas UIComposer_Box UIContentBox uiBoxGray">
        <div>
          <div class="UIComposer_Content">
            <div class="UIComposer_InputArea_Base UIComposer_InputArea">
              <div class="UIComposer_InputShadow">
                <div id="tweetText" name="tweetText" class="Mentions_Input" contenteditable="true" style="text-align:left"></div>
                <input id="tweet" name="tweet" type="hidden">
              </div>
            </div>
            <div id="composer_buttons">
              <div class="UIComposer_ButtonArea" id="c4cd6e42e87b4a4653003519_buttons">
                <ul class="UIComposer_Buttons">
                  <li class="UIComposer_FormButtons">
                    <label class="UIComposer_SubmitButton uiButton uiButtonConfirm uiButtonLarge">
                    <input value="Post" type="submit">
                    </label>
                  </li>
                  <li class="UIComposer_PrivacyEtc"></li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </form>
  <table width="90%" border="0" cellpadding="5">
    <c:forEach items="${model.topFeeds}" var="action">
      <tr>
        <td rowspan="2" style="vertical-align:top"><c:if test="${action.userAction.actionerUser.image == null}"><img class="img" width="20" height="20" src="/bob-web/user_images/no_photo.jpg"></c:if>
          <c:if test="${action.userAction.actionerUser.image != null}">
              <img class="img" width="20" height="20" src="/bob-web/user_images/${action.userAction.actionerUser.image}"></c:if></td>
        <td>

            <a href="/bob-web/service/myWall.htm?wantedUserId=${action.userAction.actionerUser.userId}"> ${action.userAction.actionerUser.name} ${action.userAction.actionerUser.surname}</a>

            <br>${action.entry}</td>

      </tr>
      <tr>
        <td><font color="#999" size="-2"> ${action.userAction.actionTime}   </font>
		<hr></td>
      </tr>
    </c:forEach>

                  </table>
              </td>
          </tr>
      </table>
    </table>
  </div>
</div>
<!-- end of center column -->
<!-- right column -->
<div id="rh-col"> <a href="/bob-web/service/homePage.htm"><img border="0" src="/bob-web/Images/logo.png" alt="BookOfBoun" width="180" height="100" /></a>
  <%@ include file="/WEB-INF/jsp/rightScreen.jsp" %>
</div>
<!-- end of right column -->
</body>
</html>